/**
 */
package gatperdut.chato.model.Chato.Craft.impl;

import gatperdut.chato.model.Chato.Craft.CraftCheck;
import gatperdut.chato.model.Chato.Craft.CraftPackage;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Check</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Craft.impl.CraftCheckImpl#getChance <em>Chance</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class CraftCheckImpl extends CDOObjectImpl implements CraftCheck {
	/**
     * The default value of the '{@link #getChance() <em>Chance</em>}' attribute.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #getChance()
     * @generated
     * @ordered
     */
	protected static final int CHANCE_EDEFAULT = 0;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected CraftCheckImpl() {
        super();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected EClass eStaticClass() {
        return CraftPackage.Literals.CRAFT_CHECK;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected int eStaticFeatureCount() {
        return 0;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public int getChance() {
        return (Integer)eDynamicGet(CraftPackage.CRAFT_CHECK__CHANCE, CraftPackage.Literals.CRAFT_CHECK__CHANCE, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setChance(int newChance) {
        eDynamicSet(CraftPackage.CRAFT_CHECK__CHANCE, CraftPackage.Literals.CRAFT_CHECK__CHANCE, newChance);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case CraftPackage.CRAFT_CHECK__CHANCE:
                return getChance();
        }
        return super.eGet(featureID, resolve, coreType);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case CraftPackage.CRAFT_CHECK__CHANCE:
                setChance((Integer)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eUnset(int featureID) {
        switch (featureID) {
            case CraftPackage.CRAFT_CHECK__CHANCE:
                setChance(CHANCE_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public boolean eIsSet(int featureID) {
        switch (featureID) {
            case CraftPackage.CRAFT_CHECK__CHANCE:
                return getChance() != CHANCE_EDEFAULT;
        }
        return super.eIsSet(featureID);
    }

} //CraftCheckImpl
